import java.util.Arrays;
import java.util.Scanner;

public class est {
    public static void main1(String[] args) {
        int[] a = {1,2,3,4};
        for(int i = 0; i < a.length; i++){
            a[i] *= 2;
        }
        String ret = (Arrays.toString(a));
        System.out.println(ret);
    }

    public static void main2(String[] args) {
        int[] a = {1,2,3,4,5,6};
        int i = 0,j = a.length - 1,flag1 = 0,flag2 = 0;
        while(i < j){
            if(a[i] % 2 != 0){
                i++;
                flag1 = 1;
            }if(a[j] % 2 == 0){
                j--;
                flag2 = 1;
            }if(flag1 == flag2){
                int temp = a[i];
                a[i] = a[j];
                a[j] = temp;
                flag1 = 0;
                flag2 = 0;
            }
        }
        String ret = (Arrays.toString(a));
        System.out.println(ret);
    }

    public static void main3(String[] args) {
        int[] a = {1,2,3,4,5,6};
        int i = 0, j = a.length;
        Scanner scanner = new Scanner(System.in);
        int k = scanner.nextInt();
        while(i < j){
            int mid = (i + j) / 2;
            if(k < a[mid]){
                j = mid - 1;
            } else if (k > a[mid]) {
                i = mid + 1;
            }else if(k == a[mid]){
                System.out.println("已找到该数字！");
                break;
            }
        }
        System.out.println("无该数字！");
    }

    public static void main4(String[] args) {
        int[] a = {1,3,4,2,5,6,7,9,8};
        int flag = 0;
        for(int i = 0; i < a.length - 1; i++){
            for(int j = 0; j < a.length - 1; j++){
                if(a[j] > a[j+1]){
                    int temp = a[j+1];
                    a[j+1] = a[j];
                    a[j] = temp;
                    flag = 1;
                }
            }
            for(int j = 0; j < a.length - 1; j++){
                if(a[j] > a[j+1]){
                    int temp = a[j+1];
                    a[j+1] = a[j];
                    a[j] = temp;
                    flag = 1;
                }
            }
            if(flag == 1){
                break;
            }
        }
        String ret = (Arrays.toString(a));
        System.out.println(ret);
    }

    public static void main5(String[] args) {
        int[] a = {1,2,3,4,5,6,7,8,9};
        Scanner scanner = new Scanner(System.in);
        int target = scanner.nextInt();
        for(int i = 0; i < a.length; i++){
            for(int j = i; j < a.length; j++){
                if(a[i] + a[j] == target){
                    System.out.println("[" + i +"," + j + "]");
                }
            }
        }
    }

    public static void main6(String[] args) {
        int[] a = {1,2,3,4,3,2,1};
        int k = 0;
        for(int i = 0; i < a.length; i++){
            k ^= a[i];
        }
        System.out.println(k);
    }

    public static void main7(String[] args) {
        int[] a = {1,1,2,4,4,4,4,4};
        int p = a.length / 2;
        Arrays.sort(a);
        System.out.println(a[p]);
    }

    public static void main(String[] args) {
        int[] a = {1,2,3,5,7,9,5,4,3,2};
        int count = 0;
        boolean isYes = false;
        for(int i = 0; i < a.length; i++){
            if(a[i] % 2 != 0){
                count++;
            }else{
                count = 0;
            }if(count >= 3){
                isYes = true;
            }
        }System.out.println(isYes);
    }
}
































